package 进阶.转换流.字符编码和字符集;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;

public class demo01_OutputStreamWriter {
    public static void main(String[] args) throws IOException {
        OutputStreamWriter opsw = new OutputStreamWriter(new FileOutputStream("d:/a.txt"),"gbk");

        opsw.write("你好");

        opsw.close();

    }
}
